<?
$name = strtolower($_POST['name']);
exec("/usr/sbin/smbldap-groupadd -a \"$name\" 2> /dev/null", $out, $ret);
switch($ret) {
	case 9:
		error("gruppen existerar redan");
		break;
	case 0:
		$change["description"] = $name;
		$dn = "cn=$name,ou=groups,".$GLOBALS["dc"];
		ldap_mod_add($conn,$dn,$change);
		break;
	default:
		error("oväntat fel");
};
?>
